package com.gordon.tips.service;

import java.util.List;

import com.gordon.tips.domain.Reply;
import com.gordon.tips.domain.Topic;
import com.gordon.tips.domain.User;

/**
 *****************************************************************************
 ** Module : Topic control service
 ** 
 ** Date:  Aug 14, 2011
 ** 
 ** Author: Gordon
 ** 
 ** Email: 462991284@qq.com
 ** 
 ** (C) Copyright 2011 Gordon's Office
 *****************************************************************************
 */
public interface TopicService
{
	/**
	 * Display forum on the forum board.
	 * @param start
	 * @param pageSize
	 * @return
	 */
	public List<Topic>getTopic(int start,int pageSize);
	
	/**
	 * count the number of topics
	 * @return
	 * @Author: Gordon
	 */
	public int countAllTopics();
	
	/**
	 * Get topic by topic's id
	 * @param id
	 * @return
	 * @Author: Gordon
	 */
	public Topic getTopicById(int id);
	
	/**
	 * Post one new topic
	 * @param topic
	 * @param reply
	 * @param user
	 * @Author: Gordon
	 */
	public void addNewTopic(Topic topic,Reply reply,User user);
	
	/**
	 * Update one topic
	 * @param topic
	 * @param reply
	 * @Author: Gordon
	 */
	public void editTopic(Topic topic,Reply reply);

}
